const mysql = require("mysql");

let pools = mysql.createPool({
    host: "192.168.174.166",
    user: "root",
    password: "ddd",
    database: "qimo"

})

function excute(sqlString,condition){
    let promise=new Promise((resolve,reject)=>{
        pools.query(sqlString,condition,function(error,result,fields){
            if(error){
                reject(error);
            }
            else{
                resolve(result);
            }
        })
    })
    return promise;
    
}
module.exports={
    EXCUTE:excute
}